const router = require('koa-router')()
const controllers = require('../controller')


// router.get('/admin', controllers.adminIndex)
// 登录
router.post('/admin/register', controllers.register)
router.post('/admin/login', controllers.login)
// router.get('/user', controllers.user)

// 电影列表
router.get('/admin/filmlist', controllers.filmList)
router.get('/admin/filmdetail', controllers.filmDetail)
router.put('/admin/filmdetail', controllers.updateFilm)
router.post('/admin/filmdetail', controllers.addFilm)
router.delete('/admin/filmdetail', controllers.deleteFilm)

// 用户管理
router.get('/admin/list', controllers.userList);
router.get('/admin/download', controllers.listDownload);
module.exports = router
